<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en">
    <head>
        <title>Hyphenator.js &ndash; Test 66</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <script src="../Hyphenator.js" type="text/javascript"></script>
        <script type="text/javascript">
            var result = {};
			if (parent != window) {
				Hyphenator.config({
					'onhyphenationdonecallback': function (src) {
                        var t1, r1, desc, msg;
                        if (src.indexOf('frame1') !== -1) {
                            t1 = frames.left.document.getElementById('test').innerHTML;
                            r1 = frames.left.document.getElementById('ref').innerHTML;
                            desc = frames.left.document.getElementById('desc').innerHTML;
                            result.frame1 = (t1 == r1); 
                        }
                        if (src.indexOf('frame2') !== -1) {
                            t1 = frames.right.document.getElementById('test').innerHTML;
                            r1 = frames.right.document.getElementById('ref').innerHTML;
                            desc = frames.right.document.getElementById('desc').innerHTML;
                            result.frame2 = (t1 == r1); 
                        }
                        if (result.hasOwnProperty('frame1') && result.hasOwnProperty('frame2')) {
                            msg = {
                                desc: desc,
                                index: 66,
                                result: (result.frame1 && result.frame2 ? "passed" : "failed")
                            };
                            parent.postMessage(JSON.stringify(msg), window.location.href);
                        }
					}
				});
			}
			Hyphenator.config({
				hyphenchar:'|',	
				doframes:true
			});
			Hyphenator.run();
        </script>
    </head>
	<frameset cols="50%, 50%">
		<frame src="files/test66_frame1.html" name="left">
		<frame src="files/test66_frame2.html" name="right">
	</frameset>
</html>